
#include "digital_LPF.h"
#include "offline_param.h"
#include "system_param.h"
#include "fault_TH_detect.h"

STR_SYSTEM_PARAM systemParam;

STR_1ST_LPF vdcLPF;
STR_1ST_LPF idcLPF;
STR_1ST_LPF vdcMotorLPF;
STR_1ST_LPF idcMotorLPF;
STR_1ST_LPF idcCleanLPF;
STR_1ST_LPF idcServiceLPF;


STR_1ST_LPF vdcPlateLPF;
STR_1ST_LPF vdcChargeLPF;

/*!
    \brief      
    \param[in]  none
    \param[out] none
    \retval     none
*/


void system_param_init(void)
{
	
	for(uint8_t i=0; i<TOF_DEVICE_ALL; i++)
	{
		if(AppParamHdl.cliff_threshold[i] == 0)
		{
			systemParam.cliff_threshold[i] = 2000;
		}
		else
		{
			systemParam.cliff_threshold[i] = AppParamHdl.cliff_threshold[i];
		}
	}
	
	LPF_1ST_order_init(&vdcPlateLPF, 1000.0f, 200.0f);
	LPF_1ST_order_init(&vdcChargeLPF, 1000.0f, 100.0f);
	
	
}

